//
//  StatusForwardCell.swift
//  LX_weibo
//
//  Created by LTT❤️ on 15/7/15.
//  Copyright © 2015年 LTT. All rights reserved.
//

import UIKit
import FFAutoLayout

class StatusForwardCell: StatusCell {
    override init(style: UITableViewCellStyle, reuseIdentifier: String?) {
        super.init(style: style, reuseIdentifier: reuseIdentifier)
        
        forwardLabel = UILabel(textColor: UIColor.darkGrayColor(), fontSize: 14, mutiLines: true)
        forwardLabel.preferredMaxLayoutWidth = UIScreen.mainScreen().bounds.width-16
        insertSubview(forwardLabel, atIndex: 0)
        forwardButton.backgroundColor = UIColor(white: 0.9, alpha: 1.0)
        insertSubview(forwardButton, atIndex: 0)
        
        //自动布局
        forwardButton.ff_AlignVertical(ff_AlignType.BottomLeft, referView: contentLabel, size: nil, offset: CGPoint(x: -12, y: 12))
        forwardButton.ff_AlignVertical(ff_AlignType.TopRight, referView:footerView, size: nil)
        forwardLabel.ff_AlignInner(ff_AlignType.TopLeft, referView: forwardButton, size: nil, offset: CGPoint(x: 12, y: 12))
        
        //配图视图
   let cons = pictureView.ff_AlignVertical(ff_AlignType.BottomLeft, referView: forwardLabel, size: CGSizeMake(290, 90), offset: CGPoint(x: 0, y: 12))
    topCons = pictureView.ff_Constraint(cons, attribute: NSLayoutAttribute.Top)!    
    widthCons = pictureView.ff_Constraint(cons, attribute: NSLayoutAttribute.Width)
    heightCons = pictureView.ff_Constraint(cons, attribute: NSLayoutAttribute.Height)
        
    }

    required init(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }

    
    
    
    
  //懒加载控件

    lazy var forwardButton = UIButton()
    
  
}
